package org.chuan.hisports.service.Imp;

import org.chuan.hisports.dao.NoticeDao;
import org.chuan.hisports.entity.Notice;
import org.chuan.hisports.service.NoticeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class NoticeServiceImp implements NoticeService {

    @Autowired
    NoticeDao noticeDao;
    @Override
    public void insert(Notice notice){
       noticeDao.insert(notice);
    }
    @Override
    public void delete(String id){
        noticeDao.delete(id);
    }
    @Override
    public void update(Notice notice){
        noticeDao.update(notice);
    }
    @Override
    public List<Notice> selectAll(){
        List<Notice> list = noticeDao.selectAll();
        return list;
    }
    @Override
    public List<Notice> selectByType(String type){
        List<Notice> list = noticeDao.selectByType(type);
        return list;
    }
    @Override
    public Notice selectById(String id){
        Notice notice = noticeDao.selectById(id);
        return notice;
    }
}
